Merged
Conversation
stitova-idm
approved these changes
Sep 24, 2025
Collaborator
stitova-idm
left a comment
There was a problem hiding this comment.
I think we should remove schema-path parameter altogether. It doesn't make sense to keep this backwards compatible. Emodpy-malaria is using emod-api 1.x and I don't think there are plans to move the project to emod-api 2.0 while keeping everything at 1.0???
Member
Author
I agree, but it'll still need a bunch of other changes (and other PRs). I've made a tracking ticket here EMOD-Hub/issues-and-discussions#100 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@ZDu-IDM (I can't tag him because he's not a member of EMOD-Hub) ran into the same schema caching issue I was struggling with earlier: https://github.com/InstituteforDiseaseModeling/emod-api-old/pull/800
His solution is better, and I'd like to apply it here.
The idea is to cache both the contents of the schema and the file name of the schema, and auto-update the contents if-and-only-if the file name changes. Good stuff.
Also note that passing schema-as-json directly remains the preferred route. Wherever possible, have whatever is calling the function
get_class_with_defaultsmanage the file I/O.